#include <stdint.h>
#define TEXTSCREEN_H


namespace krnlib {
    enum VGAColour
    {
	    VGA_BLACK = 0,
	    VGA_BLUE = 1,
	    VGA_GREEN = 2,
	    VGA_CYAN = 3,
	    VGA_RED = 4,
	    VGA_MAGENTA = 5,
	    VGA_BROWN = 6,
	    VGA_LIGHT_GREY = 7,
	    VGA_DARK_GREY = 8,
	    VGA_LIGHT_BLUE = 9,
	    VGA_LIGHT_GREEN = 10,
	    VGA_LIGHT_CYAN = 11,
	    VGA_LIGHT_RED = 12,
	    VGA_LIGHT_MAGENTA = 13,
	    VGA_LIGHT_BROWN = 14,
	    VGA_WHITE = 15,
    };
    class textscreen {
    public:
        void putc(char, uint32_t, uint32_t);
        void putc(char, uint32_t);
        void setforeground(enum VGAColour);
        void setbackground(enum VGAColour);
        textscreen();
        static uint32_t VGA_WIDTH;
        static uint32_t VGA_HEIGHT;
    private:
        void refreshcolour();
        uint8_t vga_colour;
        enum VGAColour foreground;
        enum VGAColour background;
        uint8_t* gmem;
        bool initialized;
        
    };
}
